<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			li{
				width: 300px;
				line-height: 50px;
				margin: 20px;
				background-color: yellowgreen;
			}
		</style>
	</head>
	<body>
	
	</body>
	<!--http://120.48.109.174:8081/area/hot-->
	<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
	<script type="text/javascript">
		function getCityId(city){
				$.ajax({
					type:"get",
					url:"http://120.48.109.174:8081/area/info?name="+city,
					async:true,
					success:function(res){
						console.log(res)
						var id = res.body.value;
						house(city,id)
					}
				});
		}
		
		function house(city,id){
//			http://120.48.109.174:8081/area/community?name=%E4%B8%8A%E6%B5%B7&id=AREA%7Cdbf46d32-7e76-1196
			$.ajax({
				type:"get",
				url:"http://120.48.109.174:8081/houses",
				data:{
					
					"cityId":id
				},
				async:true,
				success:function(res){
					console.log(res)
				}
			});
		}
		
		getCityId("北京")

	</script>
</html>
